<?php
/**
 * Created by PhpStorm.
 * User: jocky
 * Date: 2018/1/18
 * Time: 11:26
 */

/**
 * @var $userObj \common\models\ar\UserTrade
 * @var $withdrawObj \common\models\ar\MoneyWithdraw
 * @var $direction
 * @var $realNameInfo
 */
?>
<form class="form-horizontal form-label-left" id="money_withdraw_operate">
    <div class="form-group">
        <label class="control-label col-md-3 col-sm-3 col-xs-12">客户账号</label>
        <div class="col-md-7 col-sm-7 col-xs-12">
            <input disabled class="form-control" value="<?= $userObj->loginName; ?>"/>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-md-3 col-sm-3 col-xs-12">姓名</label>
        <div class="col-md-7 col-sm-7 col-xs-12">
            <input disabled class="form-control" value="<?= $userObj->accountName; ?>"/>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-md-3 col-sm-3 col-xs-12">出金金额</label>
        <div class="col-md-7 col-sm-7 col-xs-12">
            <input disabled class="form-control"
                   value="$<?= (float)$withdrawObj->money; ?>"/>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-md-3 col-sm-3 col-xs-12">出金方式</label>
        <div class="col-md-7 col-sm-7 col-xs-12">
            <select name="type" class="form-control">
                <option value="2" selected>线下处理</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-md-3 col-sm-3 col-xs-12"></label>
        <div class="col-md-7 col-sm-7 col-xs-12">
            <table class='table table-bordered table-striped'>
                <?php
                $str = "";
                if ($realNameInfo!="1"){
                    foreach ($realNameInfo as $v) {
                        $str .= "<tr><td>" . $v['key'] . "</td><td>" . $v['field_value'] . "</td></tr>";
                    }
                    if ($str == '') {
                        $str .= "<tr><td colspan='2'> -- </td></tr>";
                    }
                    echo $str;
                }
                ?>
            </table>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-md-3 col-sm-3 col-xs-12">备注</label>
        <div class="col-md-7 col-sm-7 col-xs-12">
            <textarea class="form-control" rows="3" name="remark" placeholder="建议填写"></textarea>
        </div>
    </div>
<!-- 
    <div class="form-group">
        <label class="control-label col-md-3 col-sm-3 col-xs-12">安全码</label>
        <div class="col-md-7 col-sm-7 col-xs-12">
            <input class="form-control" type="password" name='safe_code' placeholder="输入您账户的安全码"/>
        </div>
    </div> -->

    <input type="hidden" name="id" value="<?= $withdrawObj->id; ?>"/>

    <?php
    echo \yii\helpers\Html::hiddenInput(
        Yii::$app->request->csrfParam,
        Yii::$app->request->getCsrfToken()
    );
    ?>

</form>


